/*
 * $Id: Object.h,v 1.15 2006-06-18 10:20:46 bacon Exp $
 */

#ifndef _XPO_BAS_OBJECT_H_
#define _XPO_BAS_OBJECT_H_

#include <objc/objc.h>
#include <objc/objc-api.h>

#if defined(__APPLE__) || defined(__MACOSX__)
#include <objc/objc-class.h>
#endif

#include <xp/types.h>
#include <xp/macros.h>

@interface XpObject 
{
	struct objc_class* isa;
}

+ (id) alloc;
+ (id) new;
- (id) init;
- (void) dealloc;
- (id) copy;

- (Class) class;
- (Class) superclass;
- (MetaClass) metaclass;
- (const char*) className;
- (BOOL) isClass;
- (BOOL) isInstance;
- (BOOL) isKindOf: (Class) class_object;

+ (BOOL) canUnderstand: (SEL) selector;
- (BOOL) respondsTo: (SEL) selector;
- (BOOL) conformsTo: (Protocol*)protocol;

- (id) perform: (SEL) selector;
- (id) perform: (SEL) selector with: arg1;
- (id) perform: (SEL) selector with: arg1 with: arg2;

#if defined(__APPLE__) || defined(__MACOSX__)
- (id) forward: (SEL)sel: (marg_list)args;
#endif

- (void) subclassResponsibility;

@end

#endif
